using Com.Help.BLL;
using Com.Help.BLL.Utils;
using Com.Help.DBEntity;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Web;
using System.Web.Mvc;

namespace GGHAdminSite.Controllers
{
    /// <summary>
    /// 任务审核表
    /// </summary>
    public class TaskauditController : Controller
    {
        // GET: Variety
        public ActionResult Index()
        {
            return View();
        }

        /// <summary>
        /// 查询所有信息
        /// </summary>
        /// <returns></returns>
        public ActionResult List()
        {
            int id = 0,page = 0,rows = 0;
			try{
				id = Convert.ToInt32(id);
				page = Convert.ToInt32(page);
				rows = Convert.ToInt32(rows);
			}catch{}
            return Json(TaskauditBLL.GetList(id,page,rows));
        }

        /// <summary>
        /// 新增/修改
        /// </summary>
        /// <returns></returns>
        public ActionResult Save()
        {
int id = 0;
int tid = 0;
int tuid = 0;
datetime createtime = 0;
string uploads = Request["uploads"];
int state = 0;
            try
            {
id = int.Parse(Request["id"]);
tid = int.Parse(Request["tid"]);
tuid = int.Parse(Request["tuid"]);
createtime = datetime.Parse(Request["createtime"]);
state = int.Parse(Request["state"]);
            }
            catch { }
            return Json(TaskauditBLL.Save( id, tid, tuid, createtime, uploads, state));
        }
    }
}
